import { Platform } from 'react-native';

// 主题配置
export const theme = {
  colors: {
    primary: '#22af45',  // 主题色#22af45
    primaryLight: '#e8f5eb',  // 主题色浅色版
    white: '#fff',
    black: '#000',
    text: {
      primary: '#1a1a1a',
      secondary: '#666',
      tertiary: '#999',
    },
    background: {
      default: '#f5f5f5',
      card: '#fff',
    },
    border: {
      default: '#e5e5e5',
      light: '#f0f0f0',
    },
    status: {
      pending: '#f56c6c',
      inProgress: '#e6a23c',
      completed: '#67c23a',
    }
  },
  typography: {
    fontSize: {
      xs: 12,
      sm: 14,
      base: 16,
      lg: 18,
      xl: 20,
      xxl: 24,
    },
    fontWeight: {
      normal: '400',
      medium: '500',
      semibold: '600',
      bold: '700',
    },
    lineHeight: {
      tight: 1.25,
      normal: 1.5,
      relaxed: 1.75,
    },
  },
  spacing: {
    xs: 4,
    sm: 8,
    base: 12,
    lg: 16,
    xl: 20,
    xxl: 24,
  },
  borderRadius: {
    sm: 4,
    base: 8,
    lg: 12,
    full: 9999,
  },
  shadows: Platform.select({
    ios: {
      shadowColor: '#000',
      shadowOffset: { width: 0, height: 2 },
      shadowOpacity: 0.1,
      shadowRadius: 3,
    },
    android: {
      elevation: 3,
    },
    web: {
      boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
    },
  }),
};